﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutRepairEdit.aspx.cs"
    Inherits="BySoft.Web.Site.OutSource.OutRepairEdit" MasterPageFile="~/MastePage/SubEmptyMaster.Master" %>

<%@ MasterType VirtualPath="~/MastePage/SubEmptyMaster.Master" %>
<%@ Register Assembly="OneSoft.Web" Namespace="OneSoft.Web.UI.WebControls" TagPrefix="asp" %>
<%@ Register Src="../UserControl/SuggestTextBox2.ascx" TagName="SuggestTextBox2"
    TagPrefix="uc1" %>
<%@ Register Assembly="BySoft.Web.Controls" Namespace="BySoft.Web.Controls" TagPrefix="cc1" %>
<asp:Content ID="cphHeadContent" runat="server" ContentPlaceHolderID="EmptyMasteCPH">
    <script language="javascript" type="text/javascript">
        $(function () {
            $("#tabs").tabs({ show: function (event, ui) { iframeAutoFit(); } });
        });

        function Refreashtab() {
            $("#tabs").tabs({ show: function (event, ui) { iframeAutoFit(); } });
        }



        function OpenOutBackMatID() {
            var currentID = document.getElementById("<%=lblBillID.ClientID%>").value;

            ShowTopDialog('回厂不合格材料选择', '../ComPage/QuerySOutBackNeedRepair.aspx?id=' + currentID, 'FillOutBackMatID();', 1000, 600); return false;
        }
        //工序回调
        function FillOutBackMatID() {

            var str = getCookie(dialogReturn_key);

            if (str != null && str != "") {
                str = decodeURIComponent(str);

                document.getElementById("<%=txtOutBackMatID.ClientID%>").value = str;
                document.getElementById("<%=hidOutBackMatID.ClientID%>").value = str;








                $("#<%=btnSelectOutBackMatID.ClientID %>").click();

            }
            setCookie(dialogReturn_key, "");
        }





    </script>


    <h1 class="tit">委外 >><a href="OutRepairList.aspx">不合格品返修出厂单</a> >> 编辑</h1>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="tableStyle2">
                <table cellpadding="0" cellspacing="0" id="tBase" runat="server">
                    <tr>
                        <th class="left2">表单号码：
                        </th>
                        <td class="right2">
                            <asp:Label CssClass="lblreadonly" ID="lblBillID" runat="server"></asp:Label>
                            <asp:HiddenField ID="hdCode" runat="server" />
                        </td>
                        <th class="left2">日期：
                        </th>
                        <td class="right2">
                            <asp:Label CssClass="lblreadonly" ID="lblBillDate" runat="server"></asp:Label>
                        </td>
                    </tr>
                     <tr>
                        <th width="20%">委外回厂单号：
                        </th>
                        <td width="30%">
                            <asp:TextBox ID="txtOutBackMatID" runat="server" MaxLength="50" ReadOnly="true" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>

                            <asp:HiddenField ID="hidOutBackMatID" runat="server" />
                              

                            <asp:RequiredFieldValidator ID="rfvOutBackMatID" runat="server" ErrorMessage="请选择委外回厂单号！"
                                ControlToValidate="txtOutBackMatID" Display="None" ValidationGroup="gSubmit">
                            </asp:RequiredFieldValidator>

                            <asp:Button ID="btnSelectOutBackMatID" runat="server" CssClass="Hidden" OnClick="btnSelectOutBackMatID_Click" />

                            <span style="color: Red">*</span>
                            <a onclick="OpenOutBackMatID();">
                                <img src="../App_Themes/Common_CSS/images/GridDetail.gif" alt="" /></a>
                        </td>
                        <th width="20%">制造号码：
                        </th>
                        <td width="30%">
                            <asp:TextBox ID="txtWorkOrderNo" ReadOnly="true" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th width="20%">排程单号：
                        </th>
                        <td width="30%">
                            <asp:TextBox ID="txtScheduleID" ReadOnly="true" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>
                        </td>

                        <th width="20%">委外厂商：
                        </th>
                        <td width="30%">

                            <asp:HiddenField ID="hidSupplierID" runat="server" />
                            <asp:TextBox ID="txtSupplierName" runat="server" MaxLength="50" ReadOnly="true" CssClass="text ui-widget-content ui-corner-all"
                                Width="90%"></asp:TextBox>

                        </td>
                    </tr>
                    


                    <tr>

                        <th width="20%">回厂料号：
                        </th>
                        <td width="30%">
                            <asp:TextBox ID="txtMaterialID" ReadOnly="true" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>
                        </td>
                        <th width="20%">回厂品名：
                        </th>
                        <td width="30%">
                            <asp:TextBox ID="txtMaterialName" ReadOnly="true" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>
                        </td>

                    </tr>

                    <tr>
                        <th width="20%">规格：
                        </th>
                        <td width="30%">

                            <asp:TextBox ID="txtSpecifications" ReadOnly="true" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>

                        </td>
                        <th width="20%">单位：
                        </th>
                        <td width="30%">
                            <asp:TextBox ID="txtUnit" ReadOnly="true" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>
                        </td>


                    </tr>
                    <tr>
                        <th>不合格数量：</th>
                        <td>
                              <asp:TextBox ID="txtCanBackNum" ReadOnly="true" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>
                      
                        </td>
                        <th width="20%">返修数量：
                        </th>
                        <td width="30%">

                            <asp:TextBox ID="txtNums" runat="server" MaxLength="50" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvNums" runat="server" ErrorMessage="请输入返修数量！"
                                ControlToValidate="txtNums" Display="None" ValidationGroup="gSubmit">
                            </asp:RequiredFieldValidator>
                            <span style="color: Red">*</span>
                            <asp:RegularExpressionValidator ControlToValidate="txtNums" Display="None" ErrorMessage="返修数量，请填写数字" ID="revOutSide"
                                ValidationExpression="\d{0,9}(\.\d{0,2})?" ValidationGroup="gSubmit" runat="server"></asp:RegularExpressionValidator>
                        </td>

                    </tr>
                     <tr>
                        <th>预计回厂日期：</th>
                        <td>
                            <input class="Wdate" id="cpExpectBackDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="true" runat="server" type="text" />

                        </td>
                        <th></th>
                        <td></td>

                    </tr>
                </table>
            </div>


            <div class="controlBar" align="center">
                <table cellpadding="0" cellspacing="0" style="width: 300px; margin: 0 auto;">
                    <tr>
                        <td colspan="4">
                            <label class="btnStyleb png_bg">
                                <asp:Button ID="btnSubmit" runat="server" Text="确定"
                                    OnClick="btnSubmit_Click" ValidationGroup="gSubmit" />
                            </label>
                            <label class="btnStylec png_bg">
                                <input type="button" id="Button2" value="返回" runat="server" onclick="window.location = 'OutRepairList.aspx'" />
                            </label>
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>


